<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2021.3.24
 * Time: 10:39
 */

// 交换数组中的键和值

$input = array("a" => 1, "b" => 1, "c" => 2);
$flipped = array_flip($input);

print_r($flipped);